home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 20
/
Cream of the Crop 20 (Terry Blount) (1996).iso
/
os2
/
cpumt10b.zip
/
cpumeter.HLP
(
.txt
)
< prev
next >
Wrap
OS/2 Help File
|
1996-07-20
|
28KB
|
393 lines
ΓòÉΓòÉΓòÉ 1. About CPUMeter ΓòÉΓòÉΓòÉ
Welcome to CPUMeter Version 1.0b
I am proud to present the first public version of CPUMeter. This program is
SHAREWARE. You are allowed to distribute zip file cpum*.zip. Do NOT
redistribute any part of this zip file. After a trial period of two weeks, you
must register if you want to use the program further. Otherwise, you must
remove it from your computer.
CPUMeter is an enhanced CPU use monitor, similar to "PULSE.EXE". Unlike other
CPU monitors, it does not use a counting loop to determine the CPU load.
Instead, it uses the DosQProcStat API call. This reduces CPU load and power
consumption and makes it possible to show information about processes that hog
the CPU.
This program is SHAREWARE. That means you are allowed to copy and distribute
the original archive (cpum*.zip) and you are allowed to test the program for
four weeks. After that time, you MUST register it or remove the program from
your PC(s).
To register, send me
Money $$$$ ;-)
- either DM 20 in cash or a negotiable EUROCHECK
- or US$20 in cash or a negotiable EUROCHECK
Your postal or e-mail address, so I will know where to send your
registration key.
My address is:
Christof Pastors
Luitpoldstr. 12
91054 Erlangen
Germany
I am also open to receiving comments and suggestions about my program and
appreciate receiving constructive comments. You can contact me via e-mail at:
pastors@eev.e-technik.uni-erlangen.de
New versions of CPUMeter can be found on the regular ShareWare servers (like
Hobbes) or (the very newest) at:
http://eev11.e-technik.uni-erlangen.de/cpumeter.html
And here is the legal stuff:
CPUMeter is Copyright (c) 1996 Christof Pastors
This program is provided "as-is" in a form that gives you a chance to try it
for four weeks. After that time, you MUST either register it or remove the
program from your PC(s). I will NOT SUPPORT unregistered users (though I will
listen to their comments and constructive criticism). I have tried to find as
many bugs as possible, but am IN NO WAY RESPONSIBLE FOR INDIRECT OR SIMILAR
DAMAGES, INCLUDING ANY LOST PROFITS OR LOST DATA ARISING FROM THE USE OR
INABILITY TO USE THE SOFTWARE OR ANY DATA SUPPLIED.
ΓòÉΓòÉΓòÉ 2. Installation ΓòÉΓòÉΓòÉ
Simply unzip the zipped files into a single directory. Then, create a program
object either by starting cpu_inst.cmd or by dragging the Program template from
the Templates folder and customizing the resulting object.
CPUMeter neither registers a DLL nor creates entries in the OS/2 INI files. (I
don't like programs that modify system files!)
NEW! Accurate results with High-Resolution Timer!
To exploit the full capabilities of CPUMeter, you can use the High-Resolution
Timer. For this, you need two new drivers from IBM: CLOCK01.SYS and TIMER0.SYS.
If you have one of those rare micro-channel PCs, you need the CLOCK02.SYS
driver instead of CLOCK01.SYS. These drivers prevent CPUMeter from showing too
much CPU load for an application that awakens very frequently (for example, to
handle mouse motion messages). BUT BE WARNED...
Enabling this option can cause problems:
DOS programs that use the high-resolution timer will hang. This will
probably affect many DOS Games.
WINDOWS sessions may hang when starting or may respond slowly to mouse
input.
Seamless WINOS2 sessions may hang on startup and block the OS/2 Desktop.
If you have problems with a DOS program using the high-resolution timer, go to
the Settings Notebook for CPUMeter and disable the use of the timer. In some
cases, you may have to exit CPUMeter to free the timer.
How YOU can get these drivers:
They will be part of Merlin, the next version of OS/2.
I added the MMPM_MPU.ZIP archive that comes from IBM to the CPUMeter
archive. You can find the needed drivers there.
They are part of the DEVCON 9/10 Developer's Toolkit for OS/2 Warp (see
the BETA section).
They are part of the new Real-Time MIDI package developed by IBM.
And they are available for FTP from the HOBBES Shareware archive (file
MMPM_MPU.ZIP).
How to install the new drivers:
If you don't use (or need) the associated Multimedia Setup "MINSTALL.EXE",
which installs full MPU-401 multimedia support, install the drivers by hand as
follows:
Make a backup copy of the clock01.sys that resides in the \os2\boot\
directory.
Copy the new clock01.sys and timer0.sys to this directory.
Add the statement BASEDEV=TIMER0.SYS to your config.sys.
Reboot.
If CPUMeter can't access the high-resolution timer on program startup, it will
use the (less accurate) standard timer.
ΓòÉΓòÉΓòÉ 3. Technical Details ΓòÉΓòÉΓòÉ
How does it work? What's so special about this "Pulse"-like application?
I never liked the way most monitors of this type work: They create an
idle-priority thread that executes a never-ending counting loop, that hogs the
CPU as soon as it is otherwise idle. This way the CPU will never really be
idle....
Instead I wrote a REAL CPU monitor, that queries the OS/2 kernel every second
to determine how much CPU time each process has consumed and then displays the
results. After about 10 milliseconds, this function is complete and the CPU is
idle again. There is a "documented" undocumented API call (DosQueryProcStat)
that gives all the information required, including how much CPU time each
thread of each process has consumed. If you are curious, take a look at
pstat.exe in your \os2\ directory. Simply put, this program formats the output
of the aforementioned API call. It and the wonderful tool called watchcat
exploit this API call and gave me the idea ...
Basically, CPUMeter queries the process statistics every second and sums up the
CPU time consumed by all threads. This and the name of the process that
consumed the most CPU are displayed. There are some advantages and some
disadvantages to this approach:
Advantages:
It is easy to identify which process is actually hogging the CPU.
There is no idle thread continually counting. This means:
- The CPU is really idle when it has nothing else to do. The power
consumption of the CPU is reduced dramatically. As my favorite
German computer magazine Ct showed, OS/2 and LINUX halt the CPU when
the kernel is idle between (timer) interrupts and has nothing to do.
On my P60, the power consumed by the CPU goes down from 12W to 4W.
This could be interesting for people who like overclocking their
CPUs ;-), or for those who own a NOTEBOOK and wonder why the battery
goes low when PULSE is running...
- Other idle-priority threads like the thumbnail creator in PMVIEW.EXE
or the idle-priority worker thread in FM/2 can do their work without
having to share the CPU with PULSE and its counting loop.
Disadvantages:
When threads are created and destroyed very quickly (< 1 second),
CPUMeter will not always see them and therefore may report a lower than
actual CPU load.
Note:
The next problem is fixed if you have the new High-Resolution Timer from
IBM installed! See installation for details.
When a process awakens very often (a hundred or more times per second),
the kernel charges it with too much CPU time. This can occur for a DOS
Window that polls the keyboard or for a window that receives a lot of
messages when you move the mouse over it. I'm sorry. This is a
restriction of the kernel and is not my fault.
ΓòÉΓòÉΓòÉ 4. CPUMeter Application Help ΓòÉΓòÉΓòÉ
CPUMeter's User Interface consists of:
Main Window this is shown on startup.
PopUp menu this is shown after a Right Mouse Butto